package com.yzd.learnjava.io;

import java.io.File;

import com.yzd.learnjava.util.Print;

public class MakeDirectories {
	private static void usage() {
		Print.print("Usage: MakeDirectories path1 ...\nCreate each path\n Usage:MakeDirectories -d path1 ...\nDelete each path\nUsage : MackeDirectories -r "
				+ "path1 path2\nRenames form path1 to path2");
		System.exit(1);
	}
	
	private static void fileData(File file) {
		Print.print("Absolute path : " + file.getAbsolutePath() + "\nCan read : " + file.canRead()
		+"\nCan write : " + file.canWrite() + "\nGet name : " + file.getName()
		+"\nget Parent : " + file.getParent() + "\nlength : " + file.length()
		+"\nLast Modified : " + file.lastModified());
		if(file.isFile()) {
			Print.print("It is a file");
		} else if(file.isDirectory()) {
			Print.print("It is a directory");
		}
	}
	
	public static void main(String[] args) {
//		usage();
		fileData(new File("D:\\src\\git\\java\\javalearn\\src\\com\\yzd\\learnjava\\util\\PPrint.java"));
		
	}
}
